<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});


//后台页面
Route::group(['prefix' => 'admin','namespace' => 'Admin'], function () {
//路由前缀；命名路由（公共命名空间）；中间件（session状态；自定义登陆）；
//基本路由
    //后台主页
    Route::get('index', 'IndexController@index');
    //后台欢迎页面
    Route::get('welcome', 'IndexController@welcome');

    //后台车型资源路由
    Route::resource('carModel', 'CarModelController');
    //后台品牌资源路由
    Route::resource('brand', 'BrandController');

    //上传图片
    Route::any('upload', 'CommonController@upload');

    //品牌车系 子集添加
    Route::get('brand/create/{bid}', 'BrandController@create');


//    //后台首页
//    Route::get('index','IndexController@index');
//    Route::get('welcome','IndexController@welcome');
    //后台
    Route::resource('city','CityController');
//    Route::get('city','CityController@index');
    Route::resource('store','StoreController');




});